import random
def create_number():
    number = []
    for i in range(1,9):
        number.append(random.randint(1,33))
    return number

def verify_number(number,inNumber):
    count = 0
    for i in range(8):
        if number[i] == inNumber[i]:
            count = count + 1
    return count

number = create_number()
print(number)
while True:
    a = input("请输入8个整数（每个数字之间用空格分隔）:")
    inNumber = a.split(" ")
    b = False
    for i in inNumber:
        if i.isdigit() and int(i)<34 and int(i)>0:
            b = True
        else:
            b = False
            print("请输入1-33的整数")
            break
    if b:
        inNumber = list(map(int, inNumber))
        break
if verify_number(number,inNumber) == 8:
    print("一等奖")
elif verify_number(number,inNumber) == 7:
    print("二等奖")
elif verify_number(number,inNumber) == 6:
    print("三等奖")
elif verify_number(number,inNumber) == 5:
    print("四等奖")
else:
    print("可惜没有中奖")
#模拟随机购买10000注彩票对特定号码的中奖概率
count = 0
for i in range(1,10001):
    if verify_number(number,create_number()) > 4:
        count = count + 1
print("中奖的概率为:{}".format(count/10000))